import request from '@/utils/request'
import url from 'postcss-url'

export default{
  // current:当前页数 limit:每页记录数 teacherQuery:查询条件对象
  getTeacherPageList(current, limit, teacherQuery) {
    return request({
      // url: '/eduservice/teacher/pageTeacherCondition/'+ current + '/' + limit',
      url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },
  // 根据讲师id来删除讲师信息
  removeById(teacherId){
    return request({
      url: `/eduservice/teacher/delete/${teacherId}`,
      method: 'delete'
    })
  },
  // 添加讲师信息
  addTeacher(teacher){
    return request({
      url: '/eduservice/teacher/addTeacher',
      method: 'post',
      data:teacher
    })
  },
  // 根据讲师id来获取讲师信息
  getTeacherInfo(teacherId){
    return request({
      url: `/eduservice/teacher/getTeacher/${teacherId}`,
      method: 'get'
    })
  },
  // 更新讲师数据
  updatedTeacherInfo(teacher){
    return request({
      url: '/eduservice/teacher/updateTeacher',
      method: 'post',
      data:teacher
    })
  }
}
